﻿module Lhz.Page.DataManagement {
    class ServiceManagement extends ManagementPage<Lhz.Entity.ServiceCenter.Service> {
        constructor() {
            super({
                targetName: "服务",
                serviceNo: "service",
                getQueryArguments: function () {
                    return [["Application"]];
                },
                colModel: [
                    {
                        title: "所属应用", dataIndx: "Application", width: "200", align: "center", render: function (event, ui) {
                            var item: Lhz.Entity.ServiceCenter.Service = event.rowData;
                            return item.Application.Name;
                        }
                    },
                    { title: "名称", dataIndx: "Name", width: "200", align: "center" },
                    { title: "编号", dataIndx: "No", width: "200", align: "center" },
                    { title: "Url", dataIndx: "Url", width: "300" },
                    { title: "描述", dataIndx: "Description", width: "300" }
                ],
                detailPageUrl: "service-detail.html",
                width: 1000,
                height: 700,
                getItemName: function (mp, item) {
                    return item.Name;
                }
            });
        }
    }
    $(function () {
        new ServiceManagement();
    });
}
